cmake_minimum_required(VERSION 3.5)
project(test_heapsort)

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}) 

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
  message("debug mode")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb -Wall -Wextra -pedantic")
  add_definitions(-D_DEBUG_)
else()
  message("release mode")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -Wextra -pedantic")
endif (CMAKE_BUILD_TYPE STREQUAL "Debug") 


add_executable(test_sort
  src/common.c
  src/bubblesort.c
  src/selectsort.c
  src/insertsort.c
  src/shellsort.c
  src/quicksort.c
  src/mergesort.c
  src/heapsort.c
  src/test_sort.c
)

add_executable(perf_sort
  src/common.c
  src/insertsort.c
  src/shellsort.c
  src/mergesort.c
  src/quicksort.c
  src/heapsort.c
  src/perf_sort.c
)


